package lab02.test36;

public class Postgraduate extends Student {
    double sum=0;
    @Override
    double AverageScore() {
        for(Double score:score){
            sum=sum+score;
        }
        return averageScore=sum/3;
    }

    @Override
    String LetterGrades() {
        if(averageScore<60){
            scoreClass="不及格";
        }
        else if(averageScore>=60&&averageScore<=70){
            scoreClass="及格";
        }
        else if(averageScore>70&&averageScore<=80){
            scoreClass="一般";
        }
        else if(averageScore>80&&averageScore<=90){
            scoreClass="良好";
        }
        else if(averageScore>90&&averageScore<=100){
            scoreClass="优秀";
        }
            return scoreClass;
    }
}
